(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/house/map-search" ], {
    "0d02": function(t, e, n) {
        var i = n("f22f");
        n.n(i).a;
    },
    "4d01": function(t, e, n) {
        n.r(e);
        var i, o = n("eff4"), u = n.n(o);
        for (i in o) "default" !== i && function(t) {
            n.d(e, t, function() {
                return o[t];
            });
        }(i);
        e.default = u.a;
    },
    "6fa9": function(t, e, n) {
        n.d(e, "b", function() {
            return o;
        }), n.d(e, "c", function() {
            return u;
        }), n.d(e, "a", function() {
            return i;
        });
        var i = {
            wkNavbar: function() {
                return n.e("components/wk-navbar/index").then(n.bind(null, "88e0"));
            },
            wkLethouses: function() {
                return n.e("components/wk-lethouses/index").then(n.bind(null, "295a"));
            }
        }, o = function() {
            this.$createElement;
            this._self._c;
        }, u = [];
    },
    eff4: function(t, n, i) {
        (function(u) {
            function e(e, t) {
                var n, i = Object.keys(e);
                return Object.getOwnPropertySymbols && (n = Object.getOwnPropertySymbols(e), t && (n = n.filter(function(t) {
                    return Object.getOwnPropertyDescriptor(e, t).enumerable;
                })), i.push.apply(i, n)), i;
            }
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var t = {
                components: {},
                data: function() {
                    return {
                        mapCtx: {},
                        longitude: 0,
                        latitude: 0,
                        circles: [],
                        markers: [],
                        houseList: [],
                        community: {},
                        list: [],
                        title: "",
                        house_type: "lethouse"
                    };
                },
                computed: function(i) {
                    for (var t = 1; t < arguments.length; t++) {
                        var o = null != arguments[t] ? arguments[t] : {};
                        t % 2 ? e(Object(o), !0).forEach(function(t) {
                            var e, n;
                            e = i, t = o[n = t], n in e ? Object.defineProperty(e, n, {
                                value: t,
                                enumerable: !0,
                                configurable: !0,
                                writable: !0
                            }) : e[n] = t;
                        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(o)) : e(Object(o)).forEach(function(t) {
                            Object.defineProperty(i, t, Object.getOwnPropertyDescriptor(o, t));
                        });
                    }
                    return i;
                }({}, (n.default = void 0, i("26cb").mapState)({
                    location: function(t) {
                        return t.init.location;
                    }
                })),
                onLoad: function(t) {
                    this.longitude = this.location.lng, this.latitude = this.location.lat, this.init();
                    //进来参数处理
                    if(t.is_load){
                       this. onload_callouttap(t);
                    }
                },
                onShareAppMessage: function() {
                    return {
                        path: "pages/house/map-search",
                        success: function(t) {},
                        title: this.info.title,
                        imageUrl: this.info.photo_url
                    };
                },
                methods: {
                    init: function() {
                        this.mapHouses();
                    },
                    selectAddress: function() {
                        var e = this;
                        u.chooseLocation({
                            latitude: e.latitude,
                            longitude: e.longitude,
                            success: function(t) {
                                e.latitude = t.latitude, e.longitude = t.longitude, e.mapHouses();
                            }
                        });
                    },
                    callouttap: function(t) {
                        var e = this, t = t.detail.markerId - 1, t = this.list[t];
                        this.title = t.name;
                        console.log('t.name的值',t.name);
                        t = t.id;
                        console.log('t的值',t);
                        console.log('t.house_type',e.house_type);
                        this.$api("index.mapHouses2", {
                            communityId: t,
                            house_type: e.house_type
                        }).then(function(t) {
                            e.houseList = t.data.list;
                        });
                    },
                    onload_callouttap: function(t) {
                        var e = this;
                        this.title = t.name;
                        this.$api("index.mapHouses2", {
                            communityId: t.communityId,
                            house_type: 'lethouse'
                        }).then(function(t) {
                            e.houseList = t.data.list;
                        });
                    },
                    regionchange: function(t) {
                        var e = this;
                        "end" == t.type && "drag" == t.causedBy && u.createMapContext("map").getCenterLocation({
                            success: function(t) {
                                e.latitude = t.latitude, e.longitude = t.longitude, e.mapHouses();
                            },
                            fail: function(t) {},
                            complete: function(t) {}
                        });
                    },
                    close: function() {
                        this.houseList = [];
                    },
                    mapHouses: function() {
                        var o = this;
                        u.showLoading({
                            title: "加载中"
                        }), this.$api("index.mapHouses", {
                            longitude: o.longitude,
                            latitude: o.latitude
                        }).then(function(t) {
                            var e = t.data.list;
                            u.hideLoading(), 0 == e.length && u.showToast({
                                title: "当前区域暂未房源信息",
                                duration: 1e3,
                                icon: "none"
                            }), o.list = e;
                            var n = [];
                            n[0] = {
                                id: 0,
                                iconPath: "/static/imgs/nav.png",
                                longitude: o.longitude,
                                latitude: o.latitude,
                                width: 30,
                                height: 30
                            };
                            for (var i = 0; i < e.length; i++) n[i + 1] = {
                                id: i + 1,
                                iconPath: "/static/imgs/nav.png",
                                latitude: e[i].lat,
                                longitude: e[i].lng,
                                width: 1,
                                height: 1,
                                callout: {
                                    content: e[i].title,
                                    fontSize: 12,
                                    color: "#FFFFFF",
                                    borderRadius: 12,
                                    bgColor: "#295BFF",
                                    padding: 4,
                                    textAlign: "center",
                                    display: "ALWAYS"
                                }
                            };
                            o.markers = n;
                            t = [ {
                                latitude: o.latitude,
                                longitude: o.longitude,
                                color: "#d1edff88",
                                fillColor: "#d1edff88",
                                radius: 4e3,
                                strokeWidth: 1
                            } ];
                            o.circles = t;
                        });
                    }
                }
            };
            n.default = t;
        }).call(this, i("543d").default);
    },
    f152: function(t, e, i) {
        (function(t) {
            i("767a"), n(i("66fd"));
            var e = n(i("fe77"));
            function n(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = i, t(e.default);
        }).call(this, i("543d").createPage);
    },
    f22f: function(t, e, n) {},
    fe77: function(t, e, n) {
        n.r(e);
        var i, o = n("6fa9"), u = n("4d01");
        for (i in u) "default" !== i && function(t) {
            n.d(e, t, function() {
                return u[t];
            });
        }(i);
        n("0d02");
        var a = n("f0c5"), o = Object(a.a)(u.default, o.b, o.c, !1, null, null, null, !1, o.a, void 0);
        e.default = o.exports;
    }
}, [ [ "f152", "common/runtime", "common/vendor" ] ] ]);